package com.humingzhang.client.ftp;

import com.humingzhang.client.FileConfig;

/**
 * FTP配置
 *
 * @author minghu.zhang
 */
public class FtpConfig implements FileConfig {

    /**
     * ftp虚拟根目录
     */
    private String rootPath;
    /**
     * ftp地址
     */
    private String host;
    /**
     * ftp端口
     */
    private Integer port;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;

    public FtpConfig() {
    }

    public FtpConfig(String rootPath, String host, Integer port, String username, String password) {
        this.rootPath = rootPath;
        this.host = host;
        this.port = port;
        this.username = username;
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public FtpConfig setUsername(String username) {
        this.username = username;
        return this;
    }

    public String getPassword() {
        return password;
    }

    public FtpConfig setPassword(String password) {
        this.password = password;
        return this;
    }

    public String getHost() {
        return host;
    }

    public FtpConfig setHost(String host) {
        this.host = host;
        return this;
    }

    public Integer getPort() {
        return port;
    }

    public FtpConfig setPort(Integer port) {
        this.port = port;
        return this;
    }

    public String getRootPath() {
        return rootPath;
    }

    public FtpConfig setRootPath(String rootPath) {
        this.rootPath = rootPath;
        return this;
    }

    @Override
    public String toString() {
        return "FtpConfig{" +
                "rootPath='" + rootPath + '\'' +
                ", host='" + host + '\'' +
                ", port=" + port +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
